﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;

namespace WMS.Common
{
    public static class CodeHlper
    {
        public static string Code()
        {
            var randomNumber = new byte[4];
            using var rng = RandomNumberGenerator.Create();
            rng.GetBytes(randomNumber);
            int value = BitConverter.ToInt32(randomNumber, 0) & 0x7FFFFFFF;
            return (value % 1000000).ToString("D6");
        }
    }
}
